import tkinter
from tkinter import messagebox

window=tkinter.Tk()
window.title('my window')
window.geometry('400x300')
def hit():
    tkinter.messagebox.showinfo(title='hi',message='2333333333333')         #showinfo 和 showwarning 两种不同的弹窗警告

def git():
    tkinter.messagebox.showwarning(title='hi',message='66666666666')

tkinter.Button(window,text='wuhu',command=hit).pack()
tkinter.Button(window,text='????',command=git).pack()


window.mainloop()